<?php

namespace App\Providers;

use App\Models\Account;
use App\Models\Clue;
use App\Observers\AccountObserver;
use App\Observers\ClueObserver;
use App\Observers\UserObserver;
use App\User;
use Illuminate\Http\Resources\Json\Resource;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        Resource::withoutWrapping();
        if (env('REDIRECT_HTTPS')) {
            \URL::forceScheme('https');
        }
        Clue::observe(ClueObserver::class);
        User::observe(UserObserver::class);
        Account::observe(AccountObserver::class);
    }
}
